package cn.itcast.bookmanager.jframe;

import cn.itcast.bookmanager.dao.UserDao;
import cn.itcast.bookmanager.model.User;
import cn.itcast.bookmanager.util.JdbcUtils;
import cn.itcast.bookmanager.util.ToolUtils;
import com.mysql.jdbc.Connection;
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class LanguageFrame extends JFrame {
    public static User currentUser;
    private JFrame jf;
    private JTextField userNameText;
    private JTextField passwordText;
    private JComboBox<String> comboBox;

    UserDao userDao = new UserDao();
    JdbcUtils dbUtil = new JdbcUtils();
    public LanguageFrame(){

        jf=new JFrame("选择语言");
        jf.getContentPane().setFont(new Font("幼圆", Font.BOLD, 14));
        jf.setBounds(600, 250, 500, 467);
        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        jf.getContentPane().setLayout(null);

        JLabel lblNewLabel = new JLabel(new ImageIcon("lib\\tupian\\bg2.png"));
        lblNewLabel.setBounds(24, 10, 430, 218);
        jf.getContentPane().add(lblNewLabel);

        JButton button = new JButton("中文");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                jf.setVisible(false);
                new LoginFrame();
            }
        });
        button.setBounds(153, 300, 65, 34);
        jf.getContentPane().add(button);

        JButton button_1 = new JButton("EN");
        button_1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                jf.setVisible(false);
                new LoginFrameEn();
            }
        });
        button_1.setBounds(263, 300, 65, 34);
        jf.getContentPane().add(button_1);

        JLabel lblNewLabel_1 = new JLabel("");
        lblNewLabel_1.setIcon(new ImageIcon(LoginFrame.class.getResource("/tupian/adBG3.png")));
        lblNewLabel_1.setBounds(0, 0, 484, 429);
        jf.getContentPane().add(lblNewLabel_1);

        jf.setVisible(true);
        jf.setResizable(true);

    }

    public static void main(String[] args) {
        try {
            BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.generalNoTranslucencyShadow;
            org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper.launchBeautyEyeLNF();
        } catch (Exception e) {
            e.printStackTrace();
        }
        new LanguageFrame();
    }
}
